<template>
  <div class="goodsdesc">
    <myheader title="图片资讯">
      <template #left>
        <div class="left" @click="$router.go(-1)">返回</div>
        <!-- <van-icon name="arrow-left" @click="$router.go(-1)" /> -->
      </template>
    </myheader>

    <div class="title">{{ goodsdesc[0] && goodsdesc[0].title }}</div>

    <!-- 内容 -->
    <div class="content" v-html="goodsdesc[0] && goodsdesc[0].content"></div>
  </div>
</template>

<script>
import { getdesc } from "../../Api/goods";
import myheader from "../../components/myheader";
export default {
  data() {
    return {
      goodsdesc: [],
    };
  },
  components: {
    myheader,
  },
  async mounted() {
    // console.log("图文介绍的id",this.$route.params.id);
    let res = await getdesc(this.$route.params.id);
    // console.log(res);
    this.goodsdesc = res.data.message;
    // console.log(this.goodsdesc);
  },
};
</script>

<style lang="less" scoped>
.goodsdesc {
  width: 100%;
}
.title {
  font-size: 20px;
  font-weight: 700;
  padding: 10px;
  height: 60px;
  color: #1588d2;
  border-bottom: 1px solid #d4d4d4;
}
.content {
  /deep/ img {
    width: 100%;
    height: 100%;
    display: block;
  }
}
</style>